﻿@using DirectSell.Model.User
@model UserInforMationDetails
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/User/Views/Shared/UserLayout.cshtml";
}
<style type="text/css">
    table.t_info {
        width: 150px;
        background: #292731;
        border-collapse: collapse;
    }

        table.t_info th {
            color: #FFF;
            text-align: center;
            height: 30px;
            line-height: 30px;
            border: 1px solid #292731;
        }

            table.t_info th a {
                color: #FFF;
            }

        table.t_info ._span {
            color: #F00;
            cursor: pointer;
        }

            table.t_info ._span:hover {
                text-decoration: underline;
            }

        table.t_info td {
            font-size: 13px;
            height: 20px;
            background: #C9AA6E;
            text-align: center;
            border: 0.1rem dotted #B78E44;
        }

        table.t_info tr td {
            font-size: 10px;
        }
</style>
<!-- APP MAIN ==========-->
<main id="app-main" class="app-main">
    <div class="wrap">
        <section class="app-content">
            <div class="widget p-lg">
                <div class="form-group">
                </div><!-- .form-group -->
                <header class="widget-header">
                    <form id="form1">
                        <h4 class="widget-title">
                            位置网络图
                            &nbsp; &nbsp;
                            <input type="text" id="usercode"  class="text-capitalize" placeholder="请输入要查询的会员编号" required style="width:250px;height:20px;">
                            &nbsp;
                            <button class="btn-blue" id="sel" style="cursor: pointer;" type="button">查询</button>
                            &nbsp;
                            <a onclick="GoBack();" href="#" class="btn btn-blue">返回上一层</a>
                        </h4>
                    </form>
                </header><!-- .widget-header -->
                <hr class="widget-separator">
                <div class="table-responsive">
                    <div id="dvCategoryResults">
                        @Html.Partial("List", Model)
                    </div>
                    </div><!-- .widget-body -->
            </div><!-- .widget -->
        </section><!-- #dash-content -->
    </div><!-- .wrap -->
    <!-- APP FOOTER -->
    <div class="wrap p-t-0">
        <footer class="app-footer">
            <div class="clearfix">
                <div class="copyright text-center w100">@DirectSell.Common.Url.CommonConfig.companyName &copy;</div>
            </div>
        </footer>
    </div>
    <!-- /#app-footer -->
</main>
       <script>
           $('#sel').on('click', function () {
               var code = $('#usercode').val();
               if(code.trim()!=null&&code.trim()!=""){
                   QueryMap(code);
               }
           })
           function QueryMap(code) {
               //加载层
               var index = layer.load(1, {
                   shade: [0.1, '#fff']
               });
               $.ajax({
                       type: "post",
                       url: "/NetworkMap/IsExistence",
                       data: { code: code },
               }).success(function (message) {
                   if (message != '成功') {
                       layer.msg('该会员编号不存在', { icon: 2 });
                   }
                      $("#dvCategoryResults").load('@(Url.Action("List", "NetworkMap", null, Request.Url.Scheme))?code=' + code);
                   }).fail(function (err) {
                       layer.msg('系统错误,请稍后重试', { icon: 2 });
                   })
               layer.close(index)//关闭加载层
           }
           function Hopping(code) {
               //加载层
               var index = layer.load(1, {
                   shade: [0.1, '#fff']
               });
               $("#dvCategoryResults").load('@(Url.Action("List", "NetworkMap", null, Request.Url.Scheme))?code=' + code);
               layer.close(index)//关闭加载层
           }

           function GoBack() {
               //加载层
               var index = layer.load(1, {
                   shade: [0.1, '#fff']
               });
               var code = $('#td111').html();
               $.ajax({
                   type: "post",
                   url: "/NetworkMap/GoBack",
                   data: { code: code },
               }).success(function (message) {
                   if (message == "") {
                       layer.msg('已是最顶层',{ icon: 4 });
                   }
                   $("#dvCategoryResults").load('@(Url.Action("List", "NetworkMap", null, Request.Url.Scheme))?code=' + message);
               }).fail(function (err) {
                   layer.msg('系统错误,请稍后重试', { icon: 2 });
               })
               layer.close(index)//关闭加载层
           }

</script>